<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body onload="checkCookies();">
        <script>
            function checkCookies() {
                if (navigator.cookieEnabled === true) {
                    alert("已启用 cookie");
                } else {
                    alert("未启用 cookie");
                }
            }
        </script>
        <p>提示框会告诉你，浏览器是否已启用 cookie。</p>
    </body>
</html>
